var exec = require('cordova/exec');

var floatWindowExport = {};
floatWindowExport.show = function (msg, success, error) {
    // success error 为成功 失败回调
    // MyToast 为 plugin.xml 中配置的 feature 的name名
    //"showToast"为给Toast.java判断的action名
    exec(success, error, "call_phone_floatwindow", "showFW", msg);
};

floatWindowExport.startCallListener = function (success, error) {
    exec(success, error, "call_phone_floatwindow", "startCallListener");
};

floatWindowExport.setNetwork = function (msg, success, error) {
    exec(success, error, "call_phone_floatwindow", "setNetwork", msg);
};

module.exports = floatWindowExport;
